import org.junit.Test;

import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Created by tongchengke on 2016/7/25.
 */
public class User {

    private Long id;
    private Long phone;
    private Long tjhm;
    List<User> list;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getPhone() {
        return phone;
    }

    public void setPhone(Long phone) {
        this.phone = phone;
    }

    public Long getTjhm() {
        return tjhm;
    }

    public void setTjhm(Long tjhm) {
        this.tjhm = tjhm;
    }

    public List<User> getList() {
        return list;
    }

    public void setList(List<User> list) {
        this.list = list;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", phone=" + phone +
                ", tjhm=" + tjhm +
                ", list=" + list +
                '}';
    }

    User() {

    }

    User(Long id, Long phone, Long tjhm, List<User> list) {
        this.id = id;
        this.phone = phone;
        this.tjhm = tjhm;
        this.list = list;
    }

    public static User user;

    static {
        user = new User(1L, 11L, null, null);
        List<User> listData = new ArrayList<User>();
        for (int i = 2; i < 10; i++) {
            listData.add(new User(Long.valueOf(i), Long.valueOf(i), Long.valueOf(11), null));
        }
        user.setList(listData);
    }

    public void getUsers(User user) {
        //15574980834
        List<User> listUsers = null;//select * from user where tjhm=user.getTjhm;
        users.add(listUsers);
        for (User u1 : listUsers) {
            getUsers(u1);
        }
    }

    public List<List<User>> users = new ArrayList<List<User>>();




}
